<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>docker中搭建centos8+nginx+rtmp | 欢迎来到小羽的博客</title>
    <meta name="generator" content="VuePress 1.5.0">
    <link rel="icon" href="/favicon.ico">
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b61fe05f9bcd9cda05e839091f9a55a4";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
    <script type="text/javascript" src="/push.js"></script>
    <script type="text/javascript" src="/bdseo.js"></script>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <link rel="preload" href="/assets/css/0.styles.535c5086.css" as="style"><link rel="preload" href="/assets/js/app.14e3b6f2.js" as="script"><link rel="preload" href="/assets/js/3.38ef4e4c.js" as="script"><link rel="preload" href="/assets/js/1.dd4aade8.js" as="script"><link rel="preload" href="/assets/js/31.d9981107.js" as="script"><link rel="prefetch" href="/assets/js/10.7327de6d.js"><link rel="prefetch" href="/assets/js/11.dbb0142d.js"><link rel="prefetch" href="/assets/js/12.b0df0a98.js"><link rel="prefetch" href="/assets/js/13.478ebb6f.js"><link rel="prefetch" href="/assets/js/14.5b94084a.js"><link rel="prefetch" href="/assets/js/15.159d1a32.js"><link rel="prefetch" href="/assets/js/16.cf37c681.js"><link rel="prefetch" href="/assets/js/17.61f89c90.js"><link rel="prefetch" href="/assets/js/18.52aae943.js"><link rel="prefetch" href="/assets/js/19.152fd37e.js"><link rel="prefetch" href="/assets/js/20.ce91f28e.js"><link rel="prefetch" href="/assets/js/21.47bc5b36.js"><link rel="prefetch" href="/assets/js/22.4bb2e24d.js"><link rel="prefetch" href="/assets/js/23.8156f657.js"><link rel="prefetch" href="/assets/js/24.867f6f46.js"><link rel="prefetch" href="/assets/js/25.1195288f.js"><link rel="prefetch" href="/assets/js/26.87eb9ee8.js"><link rel="prefetch" href="/assets/js/27.f67176ce.js"><link rel="prefetch" href="/assets/js/28.9574af6a.js"><link rel="prefetch" href="/assets/js/29.ce6e5d4c.js"><link rel="prefetch" href="/assets/js/30.5a16f9ff.js"><link rel="prefetch" href="/assets/js/32.e0da40e8.js"><link rel="prefetch" href="/assets/js/33.f50cc0ef.js"><link rel="prefetch" href="/assets/js/34.6d343a0b.js"><link rel="prefetch" href="/assets/js/35.6e3a0c31.js"><link rel="prefetch" href="/assets/js/36.38b9af99.js"><link rel="prefetch" href="/assets/js/37.87aede0d.js"><link rel="prefetch" href="/assets/js/4.6cf77dfa.js"><link rel="prefetch" href="/assets/js/5.c81d3913.js"><link rel="prefetch" href="/assets/js/6.8fadf7af.js"><link rel="prefetch" href="/assets/js/7.bb84db9a.js"><link rel="prefetch" href="/assets/js/8.d9edba17.js"><link rel="prefetch" href="/assets/js/9.c228f55c.js">
    <link rel="stylesheet" href="/assets/css/0.styles.535c5086.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-dad8a512><div data-v-dad8a512><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-dad8a512 data-v-dad8a512><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-64685f0e data-v-dad8a512 data-v-dad8a512><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>欢迎来到小羽的博客</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>小羽</span>
            
          <!---->
          2020
        </a></span></div></div> <div class="hide" data-v-dad8a512><header class="navbar" data-v-dad8a512><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/logo.png" alt="欢迎来到小羽的博客" class="logo"> <span class="site-name">欢迎来到小羽的博客</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/前端/" class="nav-link"><i class="iconfont undefined"></i>
  前端
</a></li><li class="dropdown-item"><!----> <a href="/categories/安全/" class="nav-link"><i class="iconfont undefined"></i>
  安全
</a></li><li class="dropdown-item"><!----> <a href="/categories/网络/" class="nav-link"><i class="iconfont undefined"></i>
  网络
</a></li><li class="dropdown-item"><!----> <a href="/categories/运维/" class="nav-link"><i class="iconfont undefined"></i>
  运维
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      其他
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/lyff1006" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/xiaoyu-web" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/fly821760648" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-csdn"></i>
  CSDN
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://juejin.im/user/3597257778926973" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-juejin"></i>
  掘金
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://www.jianshu.com/u/4ab50cbafc3f" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-jianshu"></i>
  简书
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-dad8a512></div> <aside class="sidebar" data-v-dad8a512><div class="personal-info-wrapper" data-v-ca798c94 data-v-dad8a512><img src="/logo.png" alt="author-avatar" class="personal-img" data-v-ca798c94> <h3 class="name" data-v-ca798c94>
    小羽
  </h3> <div class="num" data-v-ca798c94><div data-v-ca798c94><h3 data-v-ca798c94>22</h3> <h6 data-v-ca798c94>文章</h6></div> <div data-v-ca798c94><h3 data-v-ca798c94>35</h3> <h6 data-v-ca798c94>标签</h6></div></div> <hr data-v-ca798c94></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/前端/" class="nav-link"><i class="iconfont undefined"></i>
  前端
</a></li><li class="dropdown-item"><!----> <a href="/categories/安全/" class="nav-link"><i class="iconfont undefined"></i>
  安全
</a></li><li class="dropdown-item"><!----> <a href="/categories/网络/" class="nav-link"><i class="iconfont undefined"></i>
  网络
</a></li><li class="dropdown-item"><!----> <a href="/categories/运维/" class="nav-link"><i class="iconfont undefined"></i>
  运维
</a></li></ul></div></div><div class="nav-item"><a href="/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      其他
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://github.com/lyff1006" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://gitee.com/xiaoyu-web" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://blog.csdn.net/fly821760648" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-csdn"></i>
  CSDN
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://juejin.im/user/3597257778926973" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-juejin"></i>
  掘金
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="https://www.jianshu.com/u/4ab50cbafc3f" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-jianshu"></i>
  简书
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-64685f0e data-v-dad8a512><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>docker中搭建centos8+nginx+rtmp</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>小羽</span>
            
          <!---->
          2020
        </a></span></div></div> <div data-v-dad8a512><main class="page"><div class="page-title" style="display:none;"><h1>docker中搭建centos8+nginx+rtmp</h1> <hr> <div data-v-aa64b9d0><i class="iconfont reco-account" data-v-aa64b9d0><span data-v-aa64b9d0>小羽</span></i> <i class="iconfont reco-date" data-v-aa64b9d0><span data-v-aa64b9d0>2020-07-29</span></i> <!----> <i class="iconfont reco-tag tags" data-v-aa64b9d0><span class="tag-item" data-v-aa64b9d0>docker</span><span class="tag-item" data-v-aa64b9d0>centos</span><span class="tag-item" data-v-aa64b9d0>nginx</span><span class="tag-item" data-v-aa64b9d0>rtmp</span></i></div></div> <div class="theme-reco-content content__default" style="display:none;"><h2 id="_1-docker中安装centos8"><a href="#_1-docker中安装centos8" class="header-anchor">#</a> 1.docker中安装centos8</h2> <h3 id="_1-1-拉取centos8的镜像"><a href="#_1-1-拉取centos8的镜像" class="header-anchor">#</a> 1.1 拉取centos8的镜像</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>docker pull centos
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_1-2-创建centos8的容器"><a href="#_1-2-创建centos8的容器" class="header-anchor">#</a> 1.2 创建centos8的容器</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>docker run -itd --privileged --name centos8 -p <span class="token number">9600</span>-9699:9600-9699 centos /usr/sbin/init
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_2-配置centos8环境"><a href="#_2-配置centos8环境" class="header-anchor">#</a> 2.配置centos8环境</h2> <h3 id="_2-1-安装gcc"><a href="#_2-1-安装gcc" class="header-anchor">#</a> 2.1 安装gcc</h3> <p>gcc是linux下的编译器在此不多做解释</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum -y <span class="token function">install</span> gcc automake autoconf libtool <span class="token function">make</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-2-安装g"><a href="#_2-2-安装g" class="header-anchor">#</a> 2.2 安装g++</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum -y <span class="token function">install</span> gcc gcc-c++
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-3-安装pcre、pcre-devel"><a href="#_2-3-安装pcre、pcre-devel" class="header-anchor">#</a> 2.3 安装pcre、pcre-devel</h3> <p>pcre是一个perl库，包括perl兼容的正则表达式库，nginx的http模块使用pcre来解析正则表达式，所以需要安装pcre库。</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> -y pcre pcre-devel
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-4-安装zlib"><a href="#_2-4-安装zlib" class="header-anchor">#</a> 2.4 安装zlib</h3> <p>zlib库提供了很多种压缩和解压缩方式nginx使用zlib对http包的内容进行gzip，所以需要安装</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> -y zlib zlib-devel
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-5-安装openssl"><a href="#_2-5-安装openssl" class="header-anchor">#</a> 2.5 安装openssl</h3> <p>openssl是web安全通信的基石，没有openssl，可以说我们的信息都是在裸奔。</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> -y openssl openssl-devel
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-6-安装vim编辑器"><a href="#_2-6-安装vim编辑器" class="header-anchor">#</a> 2.6 安装vim编辑器</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>yum -y install vim*
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-7-安装yum"><a href="#_2-7-安装yum" class="header-anchor">#</a> 2.7 安装yum</h3> <p>GNU Wget（常简称为Wget）是一个在网络上进行下载的简单而强大的自由软件，其本身也是GNU计划的一部分。</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum -y <span class="token function">install</span> <span class="token function">wget</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-8-安装git"><a href="#_2-8-安装git" class="header-anchor">#</a> 2.8 安装git</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> -y <span class="token function">git</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-9-安装passwd"><a href="#_2-9-安装passwd" class="header-anchor">#</a> 2.9 安装passwd</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment">#安装passwd</span>
yum <span class="token function">install</span> -y <span class="token function">passwd</span>

<span class="token comment">#安装完成后，输入passwd root即可修改centos的密码</span>
<span class="token function">passwd</span> root
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h3 id="_2-10-安装openssh"><a href="#_2-10-安装openssh" class="header-anchor">#</a> 2.10 安装openssh</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment">#安装openssh</span>
yum -y <span class="token function">install</span> openssh-server

<span class="token comment">#启动sshd</span>
systemctl start sshd

<span class="token comment">#修改 /etc/ssh/sshd_config 配置信息</span>
<span class="token function">vim</span> /etc/ssh/sshd_config

<span class="token comment">#重启sshd</span>
/usr/sbin/sshd -D

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><p>修改后sshd_config的配置文件如下</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>#	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 9622
AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# System-wide Crypto policy:
# This system is following system-wide crypto policy. The changes to
# Ciphers, MACs, KexAlgoritms and GSSAPIKexAlgorithsm will not have any
# effect here. They will be overridden by command-line options passed on
# the server start up.
# To opt out, uncomment a line with redefinition of  CRYPTO_POLICY=
# variable in  /etc/sysconfig/sshd  to overwrite the policy.
# For more information, see manual page for update-crypto-policies(8).

# Logging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile	.ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes

# GSSAPI options
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of &quot;PermitRootLogin without-password&quot;.
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
# WARNING: 'UsePAM no' is not supported in Fedora and may cause several
# problems.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes

# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd,
# as it is more configurable and versatile than the built-in version.
PrintMotd no

#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS

# override default of no subsystems
Subsystem	sftp	/usr/libexec/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs serverï

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br><span class="line-number">97</span><br><span class="line-number">98</span><br><span class="line-number">99</span><br><span class="line-number">100</span><br><span class="line-number">101</span><br><span class="line-number">102</span><br><span class="line-number">103</span><br><span class="line-number">104</span><br><span class="line-number">105</span><br><span class="line-number">106</span><br><span class="line-number">107</span><br><span class="line-number">108</span><br><span class="line-number">109</span><br><span class="line-number">110</span><br><span class="line-number">111</span><br><span class="line-number">112</span><br><span class="line-number">113</span><br><span class="line-number">114</span><br><span class="line-number">115</span><br><span class="line-number">116</span><br><span class="line-number">117</span><br><span class="line-number">118</span><br><span class="line-number">119</span><br><span class="line-number">120</span><br><span class="line-number">121</span><br><span class="line-number">122</span><br><span class="line-number">123</span><br><span class="line-number">124</span><br><span class="line-number">125</span><br><span class="line-number">126</span><br><span class="line-number">127</span><br><span class="line-number">128</span><br><span class="line-number">129</span><br><span class="line-number">130</span><br><span class="line-number">131</span><br><span class="line-number">132</span><br><span class="line-number">133</span><br><span class="line-number">134</span><br><span class="line-number">135</span><br><span class="line-number">136</span><br><span class="line-number">137</span><br><span class="line-number">138</span><br><span class="line-number">139</span><br><span class="line-number">140</span><br><span class="line-number">141</span><br><span class="line-number">142</span><br><span class="line-number">143</span><br><span class="line-number">144</span><br><span class="line-number">145</span><br><span class="line-number">146</span><br><span class="line-number">147</span><br><span class="line-number">148</span><br><span class="line-number">149</span><br></div></div><h3 id="_2-11-一键安装脚本"><a href="#_2-11-一键安装脚本" class="header-anchor">#</a> 2.11 一键安装脚本</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>yum -y install gcc automake autoconf libtool make pcre pcre-devel zlib zlib-devel openssl openssl-devel vim* wget git passwd openssh-server gcc gcc-c++
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_3-nginx"><a href="#_3-nginx" class="header-anchor">#</a> 3.nginx</h2> <h3 id="_3-1-下载nginx"><a href="#_3-1-下载nginx" class="header-anchor">#</a> 3.1 下载nginx</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">wget</span> http://nginx.org/download/nginx-1.19.1.tar.gz  
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_3-2-解压nginx到nginx-1-19-1"><a href="#_3-2-解压nginx到nginx-1-19-1" class="header-anchor">#</a> 3.2 解压nginx到nginx-1.19.1</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">tar</span> -zxvf  nginx-1.19.1.tar.gz
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_3-3-下载rtmp扩展包"><a href="#_3-3-下载rtmp扩展包" class="header-anchor">#</a> 3.3 下载rtmp扩展包</h3> <p>先在/usr/local/nginx下创建扩展文件夹（extend_module），然后从git上下载rtmp扩展服务</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">mkdir</span> /usr/local/nginx
<span class="token function">mkdir</span> /usr/local/nginx/extend_module
<span class="token builtin class-name">cd</span> /usr/local/nginx/extend_module
<span class="token function">git</span> clone https://github.com/winshining/nginx-http-flv-module.git
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="_3-4-配置nginx参数"><a href="#_3-4-配置nginx参数" class="header-anchor">#</a> 3.4 配置nginx参数</h3> <p>先进入nginx的目录</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token builtin class-name">cd</span> /nginx-1.19.1
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>然后进行配置</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>./configure --user<span class="token operator">=</span>www --group<span class="token operator">=</span>www --prefix<span class="token operator">=</span>/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module --add-module<span class="token operator">=</span>/usr/local/nginx/extend_module/nginx-http-flv-module
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_3-5-编译安装nginx"><a href="#_3-5-编译安装nginx" class="header-anchor">#</a> 3.5 编译安装nginx</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment">#编译</span>
<span class="token function">make</span>
<span class="token comment">#安装</span>
<span class="token function">make</span> <span class="token function">install</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="_3-6-使用systemctl管理nginx"><a href="#_3-6-使用systemctl管理nginx" class="header-anchor">#</a> 3.6 使用systemctl管理nginx</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token comment">#创建nginx.service</span>
<span class="token function">touch</span> /usr/lib/systemd/system/nginx.service 

<span class="token comment">#使用vim对nginx.service进行编辑</span>
<span class="token function">vim</span> /usr/lib/systemd/system/nginx.service

<span class="token comment">#编辑完成后，使文件生效</span>
systemctl daemon-reload

<span class="token comment">#创建用户和组</span>
/usr/sbin/groupadd -f www
/usr/sbin/useradd -g www www

<span class="token comment">#设置开机启动</span>
systemctl <span class="token builtin class-name">enable</span> nginx.service

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><p>nginx.serveice的内容如下：</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>[Unit]
Description=nginx - high performance web server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop

[Install]
WantedBy=multi-user.target
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><p>文件内容解析</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>[Unit]:服务的说明
Description:描述服务
After:描述服务类别

[Service]服务运行参数的设置
Type=forking是后台运行的形式
ExecStart为服务的具体运行命令
ExecReload为重启命令
ExecStop为停止命令
PrivateTmp=True表示给服务分配独立的临时空间
注意：启动、重启、停止命令全部要求使用绝对路径

[Install]服务安装的相关设置，可设置为多用户
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><h3 id="_3-7-启动nginx"><a href="#_3-7-启动nginx" class="header-anchor">#</a> 3.7 启动nginx</h3> <h4 id="_3-7-1-修改nginx的默认文件"><a href="#_3-7-1-修改nginx的默认文件" class="header-anchor">#</a> 3.7.1 修改nginx的默认文件</h4> <p>因为我们没有暴露80端口到docker，我们只暴露了9600-9699端口。因此需要把默认的80端口修改为我们暴露的端口。我们这里将80端口修改为9600</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">vim</span> /usr/local/nginx/conf/nginx.conf
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h4 id="_3-7-2-使nginx全局生效"><a href="#_3-7-2-使nginx全局生效" class="header-anchor">#</a> 3.7.2 使nginx全局生效</h4> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">ln</span> -s /usr/local/nginx/sbin/nginx /usr/local/bin/
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_3-7-2-systemctl启动nginx"><a href="#_3-7-2-systemctl启动nginx" class="header-anchor">#</a> 3.7.2 systemctl启动nginx</h3> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl start nginx 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></div> <footer class="page-edit" style="display:none;"><!----> <div class="last-updated"><span class="prefix">Last Updated: </span> <span class="time">2020-8-7 9:37:14</span></div></footer> <!----> <!----> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-40a3448a><li class="level-2" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_1-docker中安装centos8" class="sidebar-link" data-v-40a3448a>1.docker中安装centos8</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_1-1-拉取centos8的镜像" class="sidebar-link" data-v-40a3448a>1.1 拉取centos8的镜像</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_1-2-创建centos8的容器" class="sidebar-link" data-v-40a3448a>1.2 创建centos8的容器</a></li><li class="level-2" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-配置centos8环境" class="sidebar-link" data-v-40a3448a>2.配置centos8环境</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-1-安装gcc" class="sidebar-link" data-v-40a3448a>2.1 安装gcc</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-2-安装g" class="sidebar-link" data-v-40a3448a>2.2 安装g++</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-3-安装pcre、pcre-devel" class="sidebar-link" data-v-40a3448a>2.3 安装pcre、pcre-devel</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-4-安装zlib" class="sidebar-link" data-v-40a3448a>2.4 安装zlib</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-5-安装openssl" class="sidebar-link" data-v-40a3448a>2.5 安装openssl</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-6-安装vim编辑器" class="sidebar-link" data-v-40a3448a>2.6 安装vim编辑器</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-7-安装yum" class="sidebar-link" data-v-40a3448a>2.7 安装yum</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-8-安装git" class="sidebar-link" data-v-40a3448a>2.8 安装git</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-9-安装passwd" class="sidebar-link" data-v-40a3448a>2.9 安装passwd</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-10-安装openssh" class="sidebar-link" data-v-40a3448a>2.10 安装openssh</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_2-11-一键安装脚本" class="sidebar-link" data-v-40a3448a>2.11 一键安装脚本</a></li><li class="level-2" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-nginx" class="sidebar-link" data-v-40a3448a>3.nginx</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-1-下载nginx" class="sidebar-link" data-v-40a3448a>3.1 下载nginx</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-2-解压nginx到nginx-1-19-1" class="sidebar-link" data-v-40a3448a>3.2 解压nginx到nginx-1.19.1</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-3-下载rtmp扩展包" class="sidebar-link" data-v-40a3448a>3.3 下载rtmp扩展包</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-4-配置nginx参数" class="sidebar-link" data-v-40a3448a>3.4 配置nginx参数</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-5-编译安装nginx" class="sidebar-link" data-v-40a3448a>3.5 编译安装nginx</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-6-使用systemctl管理nginx" class="sidebar-link" data-v-40a3448a>3.6 使用systemctl管理nginx</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-7-启动nginx" class="sidebar-link" data-v-40a3448a>3.7 启动nginx</a></li><li class="level-3" data-v-40a3448a><a href="/blogs/%E8%BF%90%E7%BB%B4/2020/docker%E4%B8%AD%E6%90%AD%E5%BB%BAcentos8+nginx+rtmp.html#_3-7-2-systemctl启动nginx" class="sidebar-link" data-v-40a3448a>3.7.2 systemctl启动nginx</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-44bd5a18 data-v-44bd5a18><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-44bd5a18><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-44bd5a18></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-44bd5a18></path></svg></div></div></div>
    <script src="/assets/js/app.14e3b6f2.js" defer></script><script src="/assets/js/3.38ef4e4c.js" defer></script><script src="/assets/js/1.dd4aade8.js" defer></script><script src="/assets/js/31.d9981107.js" defer></script>
  </body>
</html>
